package com.bruce.phoneFlash;

import android.app.Application;
import android.content.SharedPreferences;

/**
 * Created by Bruce on 2016/11/25.
 */
public class MyApplication extends Application {
    private SharedPreferences sp;
    @Override
    public void onCreate() {
        super.onCreate();
        sp=getSharedPreferences("flash",MODE_PRIVATE);
    }
    public int getMode(){
     return sp.getInt("key",1);
    }
    public boolean getIsFlash(){
        return sp.getBoolean("checked",true);
    }
    public boolean getIsSMS(){
        return sp.getBoolean("sms",true);
    }

    public boolean getIsLow(){
        return sp.getBoolean("element",true);
    }
}
